package com.hqyj.project.dto;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

@Data
public class LeaveDto {
    private Integer leaveId;

    private String userName;

    private String userRealName;
    //请假状态
    private String leaveStatus;
    //审批状态
    private String leaveApproval;
    //请假信息
    private String leaveInfo;
    //请假天数
    private Integer leaveDays;
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    //提交时间
    private Date leaveSubmit;

    private Integer currentPage;
    private Integer pageSize;
    private Integer startIndex;
    public Integer getStartIndex() {
        return (this.currentPage-1)*pageSize;
    }
}
